package com.punai.web.controller.syslog;

import com.punai.common.core.controller.BaseController;
import com.punai.common.core.page.TableDataInfo;
import com.punai.system.constants.SysLogInfoConstants;
import com.punai.system.domain.SysLogInfo;
import com.punai.system.service.SysLogInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;

/**
 * 系统日志-新中大
 *
 * @author tj
 * @date 2023-10-13
 */
@RestController
@RequestMapping("/syslog/xzdxt")
public class XzdLogController extends BaseController {
    @Autowired
    private SysLogInfoService sysLogInfoService;

    /**
     * 列表
     */
    @PreAuthorize("@ss.hasPermi('syslog:xzdxt:list')")
    @GetMapping("/list")
    public TableDataInfo list(SysLogInfo sysLogInfo)
    {
        startPage();
        return getDataTable(sysLogInfoService.list(sysLogInfo,new ArrayList<String>(){{
            add(SysLogInfoConstants.LogType.XZDTOPT.getCode());
            add(SysLogInfoConstants.LogType.PTTOXZD.getCode());
        }}));
    }
}
